Optimal. Leaf size=101 \[ \frac {12 \sin (c+d x)}{35 a^3 d}-\frac {4 \sin ^3(c+d x)}{35 a^3 d}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{35 d \left (a^3+i a^3 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3583, 3581,
2713} \begin {gather*} -\frac {4 \sin ^3(c+d x)}{35 a^3 d}+\frac {12 \sin (c+d x)}{35 a^3 d}+\frac {8 i \cos ^3(c+d x)}{35 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2713
Rule 3581
Rule 3583
Rubi steps
\begin {align*} \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}+\frac {4 \int \frac {\cos (c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{7 a}\\ &=\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{35 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac {12 \int \cos ^3(c+d x) \, dx}{35 a^3}\\ &=\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{35 d \left (a^3+i a^3 \tan (c+d x)\right )}-\frac {12 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{35 a^3 d}\\ &=\frac {12 \sin (c+d x)}{35 a^3 d}-\frac {4 \sin ^3(c+d x)}{35 a^3 d}+\frac {i \cos (c+d x)}{7 d (a+i a \tan (c+d x))^3}+\frac {8 i \cos ^3(c+d x)}{35 d \left (a^3+i a^3 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 76, normalized size = 0.75 \begin {gather*} -\frac {\sec ^3(c+d x) (35+84 \cos (2 (c+d x))-15 \cos (4 (c+d x))+56 i \sin (2 (c+d x))-20 i \sin (4 (c+d x)))}{280 a^3 d (-i+\tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 141, normalized size = 1.40
method | result | size |
risch | \(\frac {i {\mathrm e}^{-3 i \left (d x +c \right )}}{8 a^{3} d}+\frac {i {\mathrm e}^{-5 i \left (d x +c \right )}}{20 a^{3} d}+\frac {i {\mathrm e}^{-7 i \left (d x +c \right )}}{112 a^{3} d}+\frac {3 i \cos \left (d x +c \right )}{16 a^{3} d}+\frac {5 \sin \left (d x +c \right )}{16 a^{3} d}\) | \(85\) |
derivativedivides | \(\frac {\frac {2}{16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+16 i}+\frac {4 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {9 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {17 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {8}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {38}{5 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {15}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {15}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{3} d}\) | \(141\) |
default | \(\frac {\frac {2}{16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+16 i}+\frac {4 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {9 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {17 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {8}{7 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {38}{5 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {15}{2 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {15}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{3} d}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 63, normalized size = 0.62 \begin {gather*} \frac {{\left (-35 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 140 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 70 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 28 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{560 \, a^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 197 vs. \(2 (87) = 174\).
time = 0.31, size = 197, normalized size = 1.95 \begin {gather*} \begin {cases} \frac {\left (- 71680 i a^{12} d^{4} e^{17 i c} e^{i d x} + 286720 i a^{12} d^{4} e^{15 i c} e^{- i d x} + 143360 i a^{12} d^{4} e^{13 i c} e^{- 3 i d x} + 57344 i a^{12} d^{4} e^{11 i c} e^{- 5 i d x} + 10240 i a^{12} d^{4} e^{9 i c} e^{- 7 i d x}\right ) e^{- 16 i c}}{1146880 a^{15} d^{5}} & \text {for}\: a^{15} d^{5} e^{16 i c} \neq 0 \\\frac {x \left (e^{8 i c} + 4 e^{6 i c} + 6 e^{4 i c} + 4 e^{2 i c} + 1\right ) e^{- 7 i c}}{16 a^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.77, size = 119, normalized size = 1.18 \begin {gather*} \frac {\frac {35}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}} + \frac {525 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 1960 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 4025 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 4480 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3143 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1176 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 243}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{7}}}{280 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.90, size = 134, normalized size = 1.33 \begin {gather*} -\frac {\left (35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,105{}\mathrm {i}-175\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,105{}\mathrm {i}-7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,77{}\mathrm {i}+43\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-13{}\mathrm {i}\right )\,2{}\mathrm {i}}{35\,a^3\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^7} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________